package com.sg.controller.bff;

import com.sg.service.biz.bff.CustomExecutionCycleService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "CustomExecutionCycle", tags = {"CustomExecutionCycle"})
@RestController
// @RequestMapping("/oms/customExecutionCycle/")
public class CustomExecutionCycleController {

    @Autowired
    CustomExecutionCycleService customExecutionCycleService;

    /**
     * B3获取上级目标内容实际工作起止时间(管理)
     * gen by moon at 5/21/2023, 7:12:41 AM
     */
    @PostMapping("/oms/mgt/customExecutionCycle/obtainParentTargetContActualWorkTime")
    @ApiOperation(value = "B3获取上级目标内容实际工作起止时间(管理)", response = OkrResult.class)
    public OkrResult<BffObtainParentTargetContActualWorkTimeRespDto> obtainParentTargetContActualWorkTime(@RequestBody(required = false) @Validated BffObtainParentTargetContActualWorkTimeReqDto reqDTO) {
        return OkrResult.success(customExecutionCycleService.obtainParentTargetContActualWorkTime(reqDTO));
    }

    /**
     * B3获取目标内容计划工作时间(管理)
     * gen by moon at 5/21/2023, 7:28:19 AM
     */
    @PostMapping("/oms/mgt/customExecutionCycle/obtainTargetContPlanWorkTime")
    @ApiOperation(value = "B3获取目标内容计划工作时间(管理)", response = OkrResult.class)
    public OkrResult<BffObtainTargetContPlanWorkTimeRespDto> obtainTargetContPlanWorkTime(@RequestBody(required = false) @Validated BffObtainTargetContPlanWorkTimeReqDto reqDTO) {
        return OkrResult.success(customExecutionCycleService.obtainTargetContPlanWorkTime(reqDTO));
    }

    /**
     * B3设置目标内容实际工作起止时间等(管理)
     * gen by moon at 5/21/2023, 7:28:22 AM
     */
    @PostMapping("/oms/mgt/customExecutionCycle/setTargetContActualWorkTimeEtc")
    @ApiOperation(value = "B3设置目标内容实际工作起止时间等(管理)", response = OkrResult.class)
    public OkrResult<BffSetTargetContActualWorkTimeEtcRespDto> setTargetContActualWorkTimeEtc(@RequestBody(required = false) @Validated BffSetTargetContActualWorkTimeEtcReqDto reqDTO) {
        return OkrResult.success(customExecutionCycleService.setTargetContActualWorkTimeEtc(reqDTO));
    }
}
